import request from '@/utils/request'

// 成品称重列表(物料明细tab上)
export const GetListAPI = params => {
  return request({
    url: '/production/weighing-finished-material-product/list',
    method: 'GET',
    params
  })
}

// 单据明细tab下方列表
export const GetViewListAPI = params => {
  return request({
    url: '/production/weighing-finished-material-product/getViewList',
    method: 'GET',
    params
  })
}

// 查看(成品称重)
export const GetViewByIdAPI = data => {
  return request({
    url: '/production/weighing-finished-material-product/getViewById/' + data,
    method: 'GET'
  })
}

// 信息打印，标签打印之后修改数据
export const UpdateDataAPI = data => {
  return request({
    url: '/production/weighing-finished-material-product/updateData',
    method: 'PUT',
    data
  })
}

// 查看(条码修正)
export const GetBarCodeCorrectionAPI = params => {
  return request({
    url: '/production/weighing-finished-material-product/getBarCodeCorrection/' + params,
    method: 'GET'
  })
}

// 条码补打
export const GetReprintAPI = data => {
  return request({
    url: '/production/weighing-finished-material-product/getReprint/' + data,
    method: 'GET'
  })
}

// 入库pda
export const WarehousingAPI = data => {
  return request({
    url: '/production/weighing-finished-material-product/warehousing',
    method: 'POST',
    data
  })
}

// 成品称重表（物料明细table下）列表
export const GetDetailListAPI = params => {
  return request({
    url: '/production/weighing-finished-material-product-detail/list',
    method: 'GET',
    params
  })
}

// 产出统计
export const MaterialAPI = params => {
  return request({
    url: '/production/weighing-finished-material-product/outputStatistics',
    method: 'GET',
    params
  })
}
